package com.leetcode.algs4.graph.least_path;

/**
 * @author Dennis Li
 * @date 2020/6/18 20:51
 */
public class DirectedEdge {

    // 定义的是起始节点，互相不一定互通
    private final int v;
    private final int w;
    private final double weight;

    public DirectedEdge(int v, int w, double weight) {
        this.v = v;
        this.w = w;
        this.weight = weight;
    }

    public double weight(){
        return weight;
    }

    public int from(){
        return v;
    }

    public int to(){
        return w;
    }

}
